package App.Repository;

import App.Entity.Notice;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by yu on 2017/7/29.
 */
@Repository
public interface NoticeRepository extends CrudRepository<Notice,Long>
{
    @Query("select id from Notice notice where notice.projectId=:projectId")
    public List<Long> getNoticeIdsByProjectId(@Param("projectId")Long projectId);
}
